<template>
  <div class="login">
    <div class="" style="width: 100%; height: 100vh">
      <u--image
        :showLoading="true"
        :src="src"
        width="100%"
        height="100%"
      ></u--image>
    </div>
    <div class="">
      <button
        class="login_btn"
        type="primary"
        @click="getUserInfo"
        style="background: #1990ff; font-size: 18px; border-radius: 5px"
      >
        我要注册
      </button>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      userInfo: [],
      src: require("@/static/index/login_bj.png"),
    };
  },
  methods: {
    getUserInfo() {
      uni.getUserProfile({
        desc: "Wexin",
        success: (res) => {
          this.userInfo = JSON.parse(res.rawData) || [];
          console.log(this.userInfo, "获取个人信息");
          uni.reLaunch({
            url: `/pages/login/registered`,
          });
        },
      });
    },
  },
};
</script>
<style lang="less" scoped>
.login {
  width: 100%;
  height: 100%;
  .title {
    // font-weight: bold;
    font-size: 24px;
    color: #333333;
    position: absolute;
    top: 10%;
    left: 42%;
    font-family: serif;
    font-family: "微软雅黑", sans-serif;
  }
  .login_btn {
    width: 140px;
    height: 44px;
    position: absolute;
    left: 50%;
    transform: translate(-50%);
    bottom: 13%;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;
  }
}
.login /deep/.u-fade-enter-active.data-v-c6ecf840,
.u-fade-leave-active.data-v-c6ecf840 {
  width: 100%;
  height: 100%;
}
</style>